package com.songlanyun.modules.ship.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.drive.IBaseService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.order.entity.Order;
import com.songlanyun.modules.ship.entity.OrderPackage;
import com.songlanyun.modules.ship.entity.OrderPackageExpress;
import com.songlanyun.modules.ship.model.dto.BranchShipVO;
import com.songlanyun.modules.ship.model.dto.ExpressShipDTO;

import java.util.List;
import java.util.Map;

/**
 * 订单的发货包裹
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-19 13:49:33
 */
public interface OrderPackageService extends IBaseService<Long,OrderPackage> {


    OrderPackage expressShip(Long shopId, ExpressShipDTO dto);

    OrderPackage pickupShip(Long shopId, ExpressShipDTO dto);

    OrderPackage autoPickupShip(Order order);

    Order receipt(Long userId, ExpressShipDTO dto);

    OrderPackage expressUpdate(Long shopId, ExpressShipDTO dto);

    OrderPackage loadByOrderIdAndPackageId(Long orderId, Long packageId,boolean tw);

    OrderPackage loadByOrderId(Long orderId,boolean tw);

    Order verification(Long shopId, ExpressShipDTO dto);

    List<OrderPackage> needAutoReceipt();
    List<OrderPackage> needAutoPickup();

    void autoReceipt(OrderPackage orderPackage);

    void autoPickupReceipt(OrderPackage orderPackage);

    OrderPackageExpress expressSelect(Long orderId,Long packageId);

    Order loadOrderByVerification(Long shopId, ExpressShipDTO dto);

    OrderPackage expressShipForImport(Long shopId, BranchShipVO importRow);

    OrderPackage partExpressShip(Long shopId, ExpressShipDTO dto);

    List<OrderPackage> loadListByOrderId(Long orderId);

    Order receiptPackage(Long userId, ExpressShipDTO dto);

    Integer createReturnId(OrderPackage entity);
}

